package com.jn.glide.views;

import android.os.Environment;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.jn.glide.R;
import com.jn.glide.base.BaseActivity;

import java.io.File;

public class TestActivity extends BaseActivity implements View.OnClickListener {
    private Button mButton;
    private ImageView mImage;

    @Override
    public int getLayoutId() {
        return R.layout.activity_test;
    }

    @Override
    public void init() {
        mButton = findViewById(R.id.button);
        mImage = findViewById(R.id.image);
        mButton.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        //Glide.with(this).load(R.mipmap.error).into(mImage);

        String path = Environment.getExternalStorageDirectory() + "/Pictures/1758990909779.png";
        Glide.with(this).load(new File(path)).into(mImage);
    }
}
